import request from '@/utils/request'

export default {
  //-- 根据条件进行分页查询违章记录
  pageViolation(current, limit, violationQuery) {
    return request({
      //url: '/service/teacher/pageListTeacherCondition/' + current + '/' + limit,
      url: `/peccancy-record/listViolations/${current}/${limit}`,
      method: 'post',
      data: violationQuery,
    })
  },

  removeViolation(id) {
    return request({
      url: `/peccancy-record/removeViolation/${id}`,
      method: 'get',

    })
  },

  findAllCarNum() {
    return request({
      url: `/peccancy-record/findAllNeedViolationCode`,
      method: 'get',
    })
  },

  saveViolation(peccancyRecord) {
    return request({
      url: `/peccancy-record/saveViolation`,
      method: 'post',
      data: peccancyRecord
    })
  },

  findViolationById(id) {
    return request({
      url: `/peccancy-record/findViolationById/${id}`,
      method: 'get',
    })
  },

  updateViolationById(peccancyRecord) {
    return request({
      url: `/peccancy-record/updateViolation`,
      method: 'post',
      data: peccancyRecord
    })
  },

  selectCheckBoxDelete(deleteCheckBox) {
    return request({
      url: `/peccancy-record/deleteSelectCheckBox/${deleteCheckBox}`,
      method: 'get',
      // param:deleteCheckBox,
    })
  }

}
